<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.page.manage_page}</h3>
        <ul class="tab1">
            <li><a href="__URL__/pageList"><span>{$Think.lang.page.all_page}</span></a></li>
            <li class="current"><empty name="rs"><a href="__URL__/addPage"><span>{$Think.lang.page.add_page}</span></a><else/><a href="__URL__/editPage/page_id/{$rs.page_id}"><span>{$Think.lang.page.edit_page}</span></a></empty></li>
        </ul>
    </div>
    <form name="cpform" method="post" action="__ACTION__">
    <input type="hidden" name="op" value="save" />
    <input type="hidden" name="page_id" value="{$rs.page_id}" />
    <table class="tb tb2">
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.page.page_title}:</td></tr>
        <tr>
            <td class="vtop rowform"><input name="title" value="{$rs.title|htmlspecialchars}" type="text" class="txt400" /></td>
            <td class="vtop tips2"></td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.page.page_content}:</td></tr>
        <tr>
            <td colspan="2"><html:markitup mode="bbcode" id="content" name="content" content="{$rs.content}" /></td>
        </tr>
        <empty name="rs">
        <tr><td class="partition" colspan="2"><label for="shortcuts">{$Think.lang.page.link_to_nav}</label> <input id="shortcuts" type="checkbox" class="checkbox" name="link_to_nav" value="1" onclick="toggleNavOptions('nav_options')" /></td></tr>
        <tbody id="nav_options" style="display:none">
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.page.nav_name}:</td></tr>
        <tr>
            <td class="vtop rowform"><input name="nav_name" value="" type="text" class="txt" /></td>
            <td class="vtop tips2">{$Think.lang.page.nav_name_explain}</td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.page.nav_visible}:</td></tr>
        <tr>
            <td class="vtop rowform" colspan="2">
                <html:radio name="nav_status" radios="navStatusRadios" checked="navStatusChecked" />
            </td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.page.nav_position}:</td></tr>
        <tr>
            <td class="vtop rowform" colspan="2">
                <html:radio name="nav_position" radios="navPositionRadios" checked="navPositionChecked" />
            </td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.page.nav_target}:</td></tr>
        <tr>
            <td class="vtop rowform">
                <html:radio name="nav_target" radios="navTargetRadios" checked="navTargetChecked" />
            </td>
            <td class="vtop tips2"></td>
        </tr>
        </tbody>
        </empty>
        <tr class="nobg"><td colspan="15"><div class="fixsel"><input class="btn" type="submit" value="{$Think.lang.submit}" /></div></td></tr>
    </table>
    </form>
</div>

<script type="text/javascript">

function toggleNavOptions(obj){
    if($('#'+obj).css('display') == 'none'){
        $('#'+obj).show();
    }else{
        $('#'+obj).hide();
    }
}
</script>

<include file="Public:footer" />
